home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / lisp / stk-3.002 / stk-3 / STk-3.1 / Doc / Manual / STk-man.macros < prev    next >
Encoding:
Text File  |  1996-07-19  |  4.7 KB  |  243 lines

  1. '\" This is slighly modified for STk
  2. '\"
  3. '\" The definitions below are for supplemental macros used in Tcl/Tk
  4. '\" manual entries.
  5. '\"
  6. '\" .AP type name in/out ?indent?
  7. '\"    Start paragraph describing an argument to a library procedure.
  8. '\"    type is type of argument (int, etc.), in/out is either "in", "out",
  9. '\"    or "in/out" to describe whether procedure reads or modifies arg,
  10. '\"    and indent is equivalent to second arg of .IP (shouldn't ever be
  11. '\"    needed;  use .AS below instead)
  12. '\"
  13. '\" .AS ?type? ?name?
  14. '\"    Give maximum sizes of arguments for setting tab stops.  Type and
  15. '\"    name are examples of largest possible arguments that will be passed
  16. '\"    to .AP later.  If args are omitted, default tab stops are used.
  17. '\"
  18. '\" .BS
  19. '\"    Start box enclosure.  From here until next .BE, everything will be
  20. '\"    enclosed in one large box.
  21. '\"
  22. '\" .BE
  23. '\"    End of box enclosure.
  24. '\"
  25. '\" .CS
  26. '\"    Begin code excerpt.
  27. '\"
  28. '\" .CE
  29. '\"    End code excerpt.
  30. '\"
  31. '\" .VS ?br?
  32. '\"    Begin vertical sidebar, for use in marking newly-changed parts
  33. '\"    of man pages.  If an argument is present, then a line break is
  34. '\"    forced before starting the sidebar.
  35. '\"
  36. '\" .VE
  37. '\"    End of vertical sidebar.
  38. '\"
  39. '\" .DS
  40. '\"    Begin an indented unfilled display.
  41. '\"
  42. '\" .DE
  43. '\"    End of indented unfilled display.
  44. '\"
  45. '\" .SO
  46. '\"    Start of list of standard options for a Tk widget.  The
  47. '\"    options follow on successive lines, in four columns separated
  48. '\"    by tabs.
  49. '\"
  50. '\" .SE
  51. '\"    End of list of standard options for a Tk widget.
  52. '\"
  53. '\" .OP cmdName dbName dbClass STklosName
  54. '\"    Start of description of a specific option.  cmdName gives the
  55. '\"    option's name as specified in the class command, dbName gives
  56. '\"    the option's name in the option database, and dbClass gives
  57. '\"    the option's class in the option database.
  58. '\"
  59. '\" .UL arg1 arg2
  60. '\"    Print arg1 underlined, then print arg2 normally.
  61. '\"
  62. '\" SCCS: @(#) man.macros 1.8 96/02/15 20:02:24
  63. '\"
  64. '\"    # Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
  65. .if t .wh -1.3i ^B
  66. .nr ^l \n(.l
  67. .ad b
  68. '\"    # Start an argument description
  69. .de AP
  70. .ie !"\\$4"" .TP \\$4
  71. .el \{\
  72. .   ie !"\\$2"" .TP \\n()Cu
  73. .   el          .TP 15
  74. .\}
  75. .ie !"\\$3"" \{\
  76. .ta \\n()Au \\n()Bu
  77. \&\\$1    \\fI\\$2\\fP    (\\$3)
  78. .\".b
  79. .\}
  80. .el \{\
  81. .br
  82. .ie !"\\$2"" \{\
  83. \&\\$1    \\fI\\$2\\fP
  84. .\}
  85. .el \{\
  86. \&\\fI\\$1\\fP
  87. .\}
  88. .\}
  89. ..
  90. '\"    # define tabbing values for .AP
  91. .de AS
  92. .nr )A 10n
  93. .if !"\\$1"" .nr )A \\w'\\$1'u+3n
  94. .nr )B \\n()Au+15n
  95. .\"
  96. .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
  97. .nr )C \\n()Bu+\\w'(in/out)'u+2n
  98. ..
  99. .AS Tcl_Interp Tcl_CreateInterp in/out
  100. '\"    # BS - start boxed text
  101. '\"    # ^y = starting y location
  102. '\"    # ^b = 1
  103. .de BS
  104. .br
  105. .mk ^y
  106. .nr ^b 1u
  107. .if n .nf
  108. .if n .ti 0
  109. .if n \l'\\n(.lu\(ul'
  110. .if n .fi
  111. ..
  112. '\"    # BE - end boxed text (draw box now)
  113. .de BE
  114. .nf
  115. .ti 0
  116. .mk ^t
  117. .ie n \l'\\n(^lu\(ul'
  118. .el \{\
  119. .\"    Draw four-sided box normally, but don't draw top of
  120. .\"    box if the box started on an earlier page.
  121. .ie !\\n(^b-1 \{\
  122. \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  123. .\}
  124. .el \}\
  125. \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  126. .\}
  127. .\}
  128. .fi
  129. .br
  130. .nr ^b 0
  131. ..
  132. '\"    # VS - start vertical sidebar
  133. '\"    # ^Y = starting y location
  134. '\"    # ^v = 1 (for troff;  for nroff this doesn't matter)
  135. .de VS
  136. .if !"\\$1"" .br
  137. .mk ^Y
  138. .ie n 'mc \s12\(br\s0
  139. .el .nr ^v 1u
  140. ..
  141. '\"    # VE - end of vertical sidebar
  142. .de VE
  143. .ie n 'mc
  144. .el \{\
  145. .ev 2
  146. .nf
  147. .ti 0
  148. .mk ^t
  149. \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
  150. .sp -1
  151. .fi
  152. .ev
  153. .\}
  154. .nr ^v 0
  155. ..
  156. '\"    # Special macro to handle page bottom:  finish off current
  157. '\"    # box/sidebar if in box/sidebar mode, then invoked standard
  158. '\"    # page bottom macro.
  159. .de ^B
  160. .ev 2
  161. 'ti 0
  162. 'nf
  163. .mk ^t
  164. .if \\n(^b \{\
  165. .\"    Draw three-sided box if this is the box's first page,
  166. .\"    draw two sides but no top otherwise.
  167. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  168. .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  169. .\}
  170. .if \\n(^v \{\
  171. .nr ^x \\n(^tu+1v-\\n(^Yu
  172. \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
  173. .\}
  174. .bp
  175. 'fi
  176. .ev
  177. .if \\n(^b \{\
  178. .mk ^y
  179. .nr ^b 2
  180. .\}
  181. .if \\n(^v \{\
  182. .mk ^Y
  183. .\}
  184. ..
  185. '\"    # DS - begin display
  186. .de DS
  187. .RS
  188. .nf
  189. .sp
  190. ..
  191. '\"    # DE - end display
  192. .de DE
  193. .fi
  194. .RE
  195. .sp
  196. ..
  197. '\"    # SO - start of list of standard options
  198. .de SO
  199. .SH "STANDARD OPTIONS"
  200. .LP
  201. .nf
  202. .ta 4c 8c 12c
  203. .ft B
  204. ..
  205. '\"    # SE - end of list of standard options
  206. .de SE
  207. .fi
  208. .ft R
  209. .LP
  210. See the \\fBoptions\\fR manual entry for details on the standard options.
  211. ..
  212. '\"    # OP - start of full description for a single option
  213. .de OP
  214. .LP
  215. .nf
  216. .ta 5c
  217. Name:    \\fB\\$2\\fR
  218. Class:    \\fB\\$3\\fR
  219. Option keyword:    \\fB\\$1\\fR
  220. STklos slot name:    \\fB\\$4\\fR
  221.  
  222. .fi
  223. .IP
  224. ..
  225. '\"    # CS - begin code excerpt
  226. .de CS
  227. .RS
  228. .nf
  229. .ta .25i .5i .75i 1i
  230. ..
  231. '\"    # CE - end code excerpt
  232. .de CE
  233. .fi
  234. .RE
  235. ..
  236. .de UL
  237. \\$1\l'|0\(ul'\\$2
  238. ..
  239. '\"    # SP - a synonym of .sp
  240. .de SP
  241. .sp
  242. ..
  243.